<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
    <th:block th:if="${dataMap['pageNum']}==1">
        <input type="hidden" id="pages" th:value="${dataMap['pages']}"/>
    </th:block>
    <th:block th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="examQuestionRecord,index:${dataMap['list']}">
        <article class="item changeless-box" th:attrappend="data-id=${examQuestionRecord['id']},data-type=${examQuestionRecord['examQuestion']['templateContent']['type']},data-name=${examQuestionRecord['templateName']},data-no=${dataMap['pageNum']}">
            <sectiont class="exam-tg-txt__wrap e-tg-box">
                <p class="fs16 c-666 mb20" th:utext="'('+${examQuestionRecord['webIndex']}+')'+${examQuestionRecord['examQuestion']['templateContent']['trunk']}+'('+${examQuestionRecord['questionScore']}+'分)'"></p>
            </sectiont>
            <!-- 没有子试题 -->
            <div th:if="!${examQuestionRecord['examQuestion']['templateContent']['haveSubTrunk']}" class="clearfix ic-answerNum-opBox e-tg-box pl10">
                <!-- 单选、多选、判断题 -->
                <th:block th:if="${examQuestionRecord['questionScoreJson']['single']} or ${examQuestionRecord['questionScoreJson']['multi']} or ${examQuestionRecord['questionScoreJson']['judge']}">
                    <div th:each="option : ${examQuestionRecord['examQuestion']['templateContent']['optionContextList']}" class="ic-options-list">
                        <label>
                            <span><em class="ic-answerNum-option" th:utext="${option['key']}"></em></span>
                            <address><span th:utext="${option['value']}"></span></address>
                        </label>
                    </div>
                    <div class="unRadius ic-options__wrap">
                        <section class="row">
                            <aside class="pull-left">
                                <div class="radio i-checks">
                                    <label th:each="option : ${examQuestionRecord['examQuestion']['templateContent']['optionList']}" class="fs18">
                                        <th:block th:if="${#maps.isEmpty(examQuestionRecord['userAnswerJson'])}">
                                            <input data-answer th:disabled="${status}==2" th:attrappend="data-qtype=${examQuestionRecord['questionScoreJson']['type']}" th:type="${examQuestionRecord['questionScoreJson']['multi']} ? 'checkbox':'radio'" th:value="${option}" data-type="1" th:name="'option_'+${examQuestionRecord['examRecordId']}+'_'+${examQuestionRecord['id']}+'_0'"/>
                                        </th:block>
                                        <th:block th:if="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])}">
                                            <input data-answer th:disabled="${status}==2" th:checked="${#lists.contains(examQuestionRecord['userAnswerJson']['answerOptList'],option)}" th:attrappend="data-qtype=${examQuestionRecord['questionScoreJson']['type']}" th:type="${examQuestionRecord['questionScoreJson']['multi']} ? 'checkbox':'radio'" th:value="${option}" data-type="1" th:name="'option_'+${examQuestionRecord['examRecordId']}+'_'+${examQuestionRecord['id']}+'_0'"/>
                                        </th:block>
                                        <i></i><span th:utext="${option}"></span>
                                    </label>
                                </div>
                            </aside>
                        </section>
                    </div>
                </th:block>
                <!-- 填空题 -->
                <div th:if="${examQuestionRecord['questionScoreJson']['blank']}" class="well unRadius ic-options__wrap">
                    <section class="row">
                        <aside class="col-sm-6 mb10"  th:each="answerMap,bIndex : ${examQuestionRecord['userAnswerJson']['blankAnswerMapList']}">
                            <p>
                                <span th:utext="${#strings.concat('（',bIndex.count, '）')}"></span>
                                <span class="ml10 form-inline">
                                    <input data-answer th:disabled="${status}==2" name="inputBlank" th:value="${answerMap['userAnswer']}" class="form-control form-answer" th:placeholder="'请输入'+${bIndex.count}+'空正确答案'" type="text"/>
                                </span>
                            </p>
                        </aside>
                    </section>
                </div>
                <!-- 简答题 -->
                <div th:if="${examQuestionRecord['questionScoreJson']['special']}" class="well unRadius ic-options__wrap">
                    <section class="row">
                        <aside class="col-sm-12">
                            <textarea data-answer th:disabled="${status}==2" rows="10" class="form-control form-answer" placeholder="请在答题框内输入答案" th:text="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} and !${#strings.isEmpty(examQuestionRecord['userAnswerJson']['specialAnswer'])}?${examQuestionRecord['userAnswerJson']['specialAnswer']}:''">
                            </textarea>
                        </aside>
                    </section>
                </div>
            </div>
            <!-- 没有子试题的答案 -->
            <section th:if="${status}==2 and !${examQuestionRecord['examQuestion']['templateContent']['haveSubTrunk']}" class="analysis-box" style="display: block;">
                <th:block th:if="${examQuestionRecord['questionScoreJson']['single']} or ${examQuestionRecord['questionScoreJson']['multi']} or ${examQuestionRecord['questionScoreJson']['judge']}">
                    <div class="row">
                        <section class="col-sm-2 text-right">
                            <span class="c-666 vam">正确答案：</span>
                        </section>
                        <section class="col-sm-10">
                            <span class="fs20 c-primary vam">
                                <th:block th:each="answer : ${examQuestionRecord['questionAnswerJson']['answerOptList']}" th:text="${answer}"></th:block>
                            </span>
                            <span class="c-666 vam ml20">你的答案：</span>
                            <span class="fs20 vam" data-toggle="tooltip" data-placement="top">
                                <th:block th:each="answer : ${examQuestionRecord['userAnswerJson']['answerOptList']}" th:text="${answer}"></th:block>
                            </span>
                        </section>
                    </div>
                </th:block>
                <th:block th:if="${examQuestionRecord['questionScoreJson']['blank']}">
                    <div class="row">
                        <section class="col-sm-2 text-right">
                            <span class="c-666 vam">正确答案：</span>
                        </section>
                        <section class="col-sm-10">
                            <th:block th:each="answer,aIndex : ${examQuestionRecord['questionAnswerJson']['answerBlankList']}">
                                <span th:text="'('+${aIndex.count}+')'"></span>
                                <span class="fs20 c-primary vam" th:text="${answer}"></span>
                                <br th:if="!${aIndex.last}"/>
                            </th:block>
                        </section>
                    </div>
                </th:block>
                <th:block th:if="${examQuestionRecord['questionScoreJson']['special']}">
                    <div class="row">
                        <section class="col-sm-2 text-right">
                            <span class="c-666 vam">正确答案：</span>
                        </section>
                        <section class="col-sm-10">
                            <span class="fs20 c-primary vam" th:utext="${examQuestionRecord['questionAnswerJson']['specialAnswer']}"></span>
                        </section>
                    </div>
                </th:block>
                <div class="row mt5">
                    <section class="col-sm-2 text-right">
                        <span class="c-666 vam">答案解析：</span>
                    </section>
                    <section class="col-sm-10">
                        <div class="fs14 c-999" th:utext="${examQuestionRecord['examQuestion']['templateContent']['analyzeContext']}"></div>
                    </section>
                </div>
                <div class="row mt5" th:if="!${#maps.isEmpty(examQuestionRecord['userAnswerJson'])} and !${#strings.isEmpty(examQuestionRecord['userAnswerJson']['comment'])}">
                    <section class="col-sm-2 text-right">
                        <span class="c-666 vam">评语：</span>
                    </section>
                    <section class="col-sm-8">
                        <textarea class="form-control" rows="5"  data-record="258" disabled="disabled" th:text="${examQuestionRecord['userAnswerJson']['comment']}"> </textarea>
                    </section>
                </div>
            </section>
            <!-- 有子试题 -->
            <div  th:if="${examQuestionRecord['examQuestion']['templateContent']['haveSubTrunk']}"  class="tabs-container">
                <ul class="nav nav-tabs">
                    <li th:each="subTrunk,subIndex:${examQuestionRecord['examQuestion']['templateContent']['subTrunkList']}"
                        th:classappend="${subIndex.count}==1 ? 'active':''"
                        th:attrappend="id='li_'+${examQuestionRecord['id']}+'-'+${subIndex.count}">
                        <a data-toggle="tab" href="javascript:void(0)" aria-expanded="true" th:utext="'题'+${subIndex.count}"></a>
                    </li>
                </ul>
                <div class="tab-content">
                    <div th:each="subTrunk,subIndex: ${examQuestionRecord['examQuestion']['templateContent']['subTrunkList']}" th:attrappend="data-type=${subTrunk['type']},id='div_'+${examQuestionRecord['id']}+'-'+${subIndex.count}" th:classappend="${subIndex.count}==1 ? 'active':''" class="tab-pane sub-trunk-box">
                        <div class="panel-body">
                            <!-- 小题干，开始 -->
                            <section class="exam-tg-txt__wrap e-tg-box" style="padding-top: 0;">
                                <p class="fs16 c-666 mb20" th:utext="${subTrunk['trunk']}"></p>
                            </section>
                            <!-- 小题干，结束 -->

                            <div class="clearfix ic-answerNum-opBox e-tg-box pl10">
                                <!-- 单选、多选、判断 -->
                                <th:block th:if="${subTrunk['single']} or ${subTrunk['multi']} or ${subTrunk['judge']}">
                                    <div th:each="option : ${subTrunk['optionContextList']}"  class="ic-options-list">
                                        <label>
                                            <span><em class="ic-answerNum-option" th:utext="${option['key']}"></em></span>
                                            <address><span th:utext="${option['value']}"></span></address>
                                        </label>
                                    </div>
                                    <div class="unRadius ic-options__wrap">
                                        <section class="row">
                                            <aside class="pull-left">
                                                <div class="radio i-checks">
                                                    <label class="fs18" th:each="option : ${subTrunk['optionList']}">
                                                        <th:block th:if="${#maps.isEmpty(subTrunk['userAnswerJson'])}">
                                                            <input data-answer class="answer-box" th:disabled="${status}==2" th:type="${subTrunk['multi']}? 'checkbox':'radio'" th:value="${option}" data-type="2" th:name="'option_'+${examQuestionRecord['id']}+'_'+${subIndex.count}">
                                                        </th:block>
                                                        <th:block th:if="!${#maps.isEmpty(subTrunk['userAnswerJson'])}">
                                                            <input data-answer th:checked="${#lists.contains(subTrunk['userAnswerJson']['answerOptList'],option)}" class="answer-box" th:disabled="${status}==2" th:type="${subTrunk['multi']}? 'checkbox':'radio'" th:value="${option}" data-type="2" th:name="'option_'+${examQuestionRecord['id']}+'_'+${subIndex.count}">
                                                        </th:block>
                                                        <i></i><span th:utext="${option}"></span>
                                                    </label>
                                                </div>
                                            </aside>
                                        </section>
                                    </div>
                                </th:block>
                                <!-- 填空题 -->
                                <div th:if="${subTrunk['blank']}" class="well unRadius ic-options__wrap">
                                    <section class="row">
                                        <aside class="col-sm-6 mb10" th:each="answerMap,aIndex : ${subTrunk['userAnswerJson']['blankAnswerMapList']}">
                                            <p>
                                                <span th:utext="${#strings.concat('（', aIndex.count, '）')}"></span>
                                                <span class="ml10 form-inline">
                                                    <input th:value="${answerMap['userAnswer']}" data-answer name="inputBlank" th:disabled="${status}==2" class="form-control form-answer" th:placeholder="'请输入'+${aIndex.count}+'空正确答案'" type="text"/>
                                                </span>
                                            </p>
                                        </aside>
                                    </section>
                                </div>
                                <div th:if="${subTrunk['special']}" class="well unRadius ic-options__wrap">
                                    <section class="row">
                                        <aside class="col-sm-12" >
                                            <textarea  data-answer th:disabled="${status}==2" data-type="2" rows="10" class="form-control" placeholder="请在答题框内输入答案" th:text="${subTrunk['userAnswerJson']['userSpecialAnswer']}"></textarea>
                                        </aside>
                                    </section>
                                </div>
                            </div>
                            <section th:if="${status==2}" class="analysis-box" style="display: block;">
                                <th:block th:if="${subTrunk['single']} or ${subTrunk['multi']} or ${subTrunk['judge']}">
                                    <div class="row">
                                        <section class="col-sm-2 text-right">
                                            <span class="c-666 vam">正确答案：</span>
                                        </section>
                                        <section class="col-sm-10">
                                            <span class="fs20 c-primary vam">
                                                <th:block th:each="answer : ${subTrunk['answerOptList']}" th:utext="${answer}"></th:block>
                                            </span>
                                            <span class="c-666 vam ml20">你的答案：</span>
                                            <span class="fs20 vam" data-toggle="tooltip" data-placement="top">
                                                <th:block th:each="answer : ${subTrunk['userAnswerJson']['answerOptList']}" th:text="${answer}"></th:block>
                                            </span>
                                        </section>
                                    </div>
                                </th:block>
                                <th:block th:if="${subTrunk['blank']}">
                                    <div class="row">
                                        <section class="col-sm-2 text-right">
                                            <span class="c-666 vam">正确答案：</span>
                                        </section>
                                        <section class="col-sm-10">
                                            <th:block th:each="answer,aIndex : ${subTrunk['questionAnswerJson']['answerBlankList']}">
                                                <span th:text="'('+${aIndex.count}+')'"></span>
                                                <span class="fs20 c-primary vam" th:text="${answer}"></span>
                                                <br th:if="!${aIndex.last}"/>
                                            </th:block>
                                        </section>
                                    </div>
                                </th:block>
                                <th:block th:if="${subTrunk['special']}">
                                    <div class="row">
                                        <section class="col-sm-2 text-right">
                                            <span class="c-666 vam">正确答案：</span>
                                        </section>
                                        <section class="col-sm-10">
                                            <span class="fs20 c-primary vam" th:utext="${subTrunk['questionAnswerJson']['specialAnswer']}"></span>
                                        </section>
                                    </div>
                                </th:block>
                                <div class="row mt5">
                                    <section class="col-sm-2 text-right">
                                        <span class="c-666 vam">答案解析：</span>
                                    </section>
                                    <section class="col-sm-10">
                                        <div class="fs14 c-999" th:utext="${subTrunk['analyzeContext']}"></div>
                                    </section>
                                </div>
                                <div class="row mt5" th:if="!${#maps.isEmpty(subTrunk['userAnswerJson'])} and !${#strings.isEmpty(subTrunk['userAnswerJson']['comment'])}">
                                    <section class="col-sm-2 text-right">
                                        <span class="c-666 vam">评语：</span>
                                    </section>
                                    <section class="col-sm-8">
                                        <textarea row ="5" class="form-control comment-box"  data-record="258" disabled="disabled" th:text="${subTrunk['userAnswerJson']['comment']}"></textarea>
                                    </section>
                                </div>
                            </section>
                        </div>
                    </div>
                </div>
            </div>
        </article>
    </th:block>
    <th:block th:if="${dataMap['pageNum']}==1 and ${dataMap['pages']}>1">
        <th:block th:each="pageNo : ${#numbers.sequence(2,dataMap['pages'])}">
            <th:block th:each="index: ${#numbers.sequence(1,10)}">
                <th:block th:if="((${pageNo}-1) * 10 + ${index}) <= ${dataMap['total']}">
                    <article class="item hide temporary-box" th:attrprepend="data-no=${pageNo}"></article>
                </th:block>
            </th:block>
        </th:block>
    </th:block>
</html>